package liumengbaio.lolzhangyoubao.Activity.Fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;

import liumengbaio.lolzhangyoubao.R;

/**
 * 折扣
 * Created by lanouhn on 16/8/24.
 */
public class FragmentHeroDiscount extends Fragment {
    private  WebView webview;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

        View view =inflater.inflate(R.layout.fragment_discount, null);

        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        initView(getView());
        initData();
    }

    private void initView(View view) {
        webview = (WebView) view.findViewById(R.id.webview);


    }

    private void initData() {
        WebSettings wSet =webview.getSettings();
        wSet.setJavaScriptEnabled(true);
        webview.loadUrl("http://lol.zhangyoubao.com//mobiles//nolayout//69845%22%7D,%22code%22:200,%22message%22:%22ok%22,%22api%22:1");
    }

}
